package com.cl.crm.web.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import flex.messaging.FlexContext;
/**
 * �Զ���session
 * @author Administrator
 *
 */
public class MySession {
	/**
	 * �Զ��������ݵ�session
	 * @param key
	 * @param val
	 */
	public static void setAttribute(String key,Object val){
		HttpServletRequest request =FlexContext.getHttpRequest();
		
		HttpSession session=request.getSession();
		
		session.setAttribute(key,val);
	}
	public static Object getAttribute(String key){
		HttpServletRequest request =FlexContext.getHttpRequest();
		
		HttpSession session=request.getSession();
		
		return session.getAttribute(key);
	}
}